import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import apiUrl from './api/apiUrl.js';
import apiUtil from './api/apiUtil.js';

// 公共属性
let commonPrototype = {
    apiUrl,

    postAction: apiUtil.postAction,
    deleteAction: apiUtil.deleteAction,
    putAction: apiUtil.putAction,
    getAction: apiUtil.getAction
}
// 遍历设置 定义全局变量
for(var item in commonPrototype) {
    Vue.prototype['$'+item] = commonPrototype[item];
}

Vue.config.productionTip = false
Vue.use(ElementUI);

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
